import { http } from "@/utils/http";
import type { HttpResult } from "/@/utils/http/types";

export function queryPage(params?: object) {
  return http.request<HttpResult>("get", "/esflow/order/getpage", {
    params: params
  });
}

export function queryList(params?: object) {
  return http.request<HttpResult>("get", "/esflow/order/getlist", {
    params: params
  });
}

export function queryGroup(params?: object) {
  return http.request<HttpResult>("get", "/esflow/order/getgroup", {
    params: params
  });
}

export function addObj(params?: object) {
  return http.request<HttpResult>("post", "/esflow/order/insert", {
    data: params
  });
}

export function getObj(id: string) {
  return http.request<HttpResult>("get", `/esflow/order/${id}`);
}

export function delObjs(id: string) {
  return http.request<HttpResult>("post", `/esflow/order/delete/${id}`);
}

export function updateObj(params?: object) {
  return http.request<HttpResult>("post", "/esflow/order/update", {
    data: params
  });
}

export function listByIds(ids?: object) {
  return http.request<HttpResult>("post", "/esflow/order/list/ids", {
    data: ids
  });
}
